package com.jy.wms.dao;

import com.jy.wms.common.base.BaseDao;
import com.jy.wms.pojo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: UserController
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @Author syh
 * @Date 2018/9/13
 */
public interface YofotoMapper extends BaseDao<WmsShipmentOrder> {
    //<!----------------------------承运商选择------------------------------->
    /**
     * 计算每个单子的重量
     * */
    public WmsShipmentOrder sumZl(@Param("fybh") String fybh);
    /**
     * 根据发运编号修改承运商类别
     * */
    public Integer updateCyslb(@Param("WmsShipmentOrder") WmsShipmentOrder wmsShipmentOrder);
    //<!---------------------------被动提供接口--------------------------------->
    /**
     *出库订单状态查询接口
     * @param sono 订单号
     * @param works 货主
     * */
    public WmsShipmentOrder getSelect(@Param("sono") String sono,@Param("works") String works);

    /**
     * 查看复核表 判断是否复核完成
     * */
    public Integer selectReview();

    /**
     * 出库订单修改接口
     * */
    public Integer getUpdate( @Param("WmsShipmentOrder") WmsShipmentOrder wmsShipmentOrder);

    /**
     * 查询发运订单 判断是否是发运之前
     * */
    public WmsShipmentOrder selectFy(@Param("WmsShipmentOrder") WmsShipmentOrder wmsShipmentOrder);

    /**
     * 销售出库单取消
     * */
    public Integer getDelete(@Param("sono") String sono);

    /**
     * 根据传入商品编码查询货品id
     * */
    public List<WmsShipmentOrderDetailed> selectHpbm(@Param("matno") String matno);
    /**
     * 发运订单添加
     * */
    public Integer saveFy(@Param("WmsShipmentOrder") WmsShipmentOrder wmsShipmentOrder);
    /**
     * 发运订单明细添加
     * */
    public Integer saveFyDetailed(@Param("WmsShipmentOrderDetailed")WmsShipmentOrderDetailed wmsShipmentOrderDetailed);
    /**
     * 根据传入客户编码查询客户id
     * */
    public WmsCustomerFile selectKhbm(@Param("custno")String custno);
    /**
     * 根据传入订单号判断是否存在重复
     * */
    public WmsShipmentOrder selectSfRepetition(@Param("sono") String sono);
    /**
     * 根据传入业务类型查询业务id
     * */
    public String selectYwlx(@Param("sectype")String sectype);
    //<!---------------------------主动接口--------------------------------->
    /**
     * 根据传入订单类型查询本系统库里订单类型
     * */
    public WmsOwnerOrdertype selectDdlx(@Param("sotype") String sotype, @Param("fl") String fl);
    /**
     * 根据发运编号查询数据
     * */
    public WmsShipmentOrder getSelectBh(@Param("sono") String sono,@Param("sotype") String sotype);
    /**
     * 查询订单类型接口
     * */
    public List<WmsOwnerOrdertype> getDdlx(@Param("ckid")String ckid, @Param("sshzid")String sshzid);

    ////////////////8-17新增////////////////////

    /**
     * 查订单渠道id,用订单渠道编码
     * @param sectype
     * @return
     */
    public String getDdqdid(@Param("sectype")String sectype);

    /**
     * 查看订单类型id
     * @param ddlx
     * @param ckid
     * @param hzid
     * @return
     */
    public String getDdlxs(@Param("ddlx")String ddlx,@Param("ckid")String ckid,@Param("hzid")String hzid);

    /**
     * 查库里默认的全部线路,默认第一个
     * @param ckid
     * @param hzid
     * @return
     */
    public List<WmsLine> getXl(@Param("ckid")String ckid, @Param("hzid")String hzid);

    /**
     * 添加客户档案(对方客户编号在wms库里没找到的情况下,新增一条客户档案)
     * @param wmsCustomerFile
     * @return
     */
    public Integer getAddCustomerFile(@Param("WmsCustomerFile") WmsCustomerFile wmsCustomerFile);
}
